//
//  LDLTView.m
//  CoreData
//
//  Created by dllo on 15/11/20.
//  Copyright (c) 2015年 蓝鸥3g学院. All rights reserved.
//

#import "LDLTView.h"

@implementation LDLTView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        //创建lable和textfield
        [self createView];
    }
    return self;
}


- (void)createView {
    self.Lable = [[UILabel alloc] initWithFrame:CGRectMake(20, 20, 150, 50)];
    self.Lable.layer.borderWidth = 1;
    self.Lable.layer.cornerRadius = 10;
    //把lable贴在LTView上
    [self addSubview:self.Lable];
    
    
    
    self.TextField = [[UITextField alloc] initWithFrame:CGRectMake(180, 20, 150, 50)];
    self.TextField.layer.borderWidth = 1;
    self.TextField.layer.cornerRadius = 10;
    [self addSubview:self.TextField];
    
    self.TextField.delegate = self;
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
    [self.TextField resignFirstResponder];
    return YES;
}


@end
